From 52e6543ba51b99e9f8be01fc844b59fc51f138f6 Mon Sep 17 00:00:00 2001 From: DaPorkchop_ Date: Tue, 11 Jun 2019 12:07:35 +0200 Subject: Respect return value of cLuaWindow's OnClicked handler (#4322) --- src/Bindings/LuaWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp index f19e9ab7c..a81021475 100644 --- a/src/Bindings/LuaWindow.cpp +++ b/src/Bindings/LuaWindow.cpp @@ -218,7 +218,8 @@ void cLuaWindow::Clicked(cPlayer & a_Player, int a_WindowID, short a_SlotNum, eC if (m_OnClicked != nullptr) { // Plugin can stop a click - if (m_OnClicked->Call(this, &a_Player, a_SlotNum, a_ClickAction, a_ClickedItem)) + bool res; + if (m_OnClicked->Call(this, &a_Player, a_SlotNum, a_ClickAction, a_ClickedItem, cLuaState::Return, res) && res) { // Tell the client the actual state of the window a_Player.GetClientHandle()->SendInventorySlot(-1, -1, a_Player.GetDraggingItem()); -- cgit v1.2.3